<!--
+----------------------------------------------------------------------
| 友得云客  - 开启房产营销新纪元
+----------------------------------------------------------------------
| Copyright (c) 2019~2023 优得（西安）信息科技有限公司版权所有
+----------------------------------------------------------------------
| Licensed 友得云客不是自由软件 未经允许不可移除相关版权
+----------------------------------------------------------------------
| Author: www.youdeyunke.com
+----------------------------------------------------------------------
-->
<template>
  <div class="style1 item-list" v-cloak>
    <div class="item" v-for="item in items">
      <div class="left">
        <div class="title">
          <div class="new-tag" :style="{ backgroundColor: primaryColor }">
            {{ item.news_cat }}
          </div>
          {{ item.title }}
        </div>
        <!-- <div class="summary">{{ item.summary }}</div> -->
        <div class="footer">
            <img :src="item.avatar" v-if="item.avatar" class="new-avatar" alt="">
          <div class="author">{{ item.author }}</div>
          <div class="date">{{ item.date }}</div>
        </div>
      </div>

      <div class="cover">
        <img
          src="https://tcdn.udeve.net/fang2021/377c3034-69e7-4f70-83a1-91d4b3d8f819.jpg"
        />
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      loading: false,
    };
  },
  props: {
    items: { type: Array, default: [] },
    primaryColor: { type: String, default: "#1989fa" },
  },

  mounted: function () {},

  computed: {},

  methods: {},
};
</script>

<style scoped>
.item-list {
  width: 100%;
  display: flex;
  flex-direction: column;
  /* padding: 0 20px; */
  justify-content: flex-start;
  align-items: center;
}

.item {
  display: flex;
  justify-content: space-between;
  box-sizing: border-box;
  align-items: flex-start;
  width: 100%;
  min-height: 152px;
  margin-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
  padding-bottom: 10px;
}

.item:last-child {
  border: none;
  margin-bottom: none;
}

.item .summary {
  font-size: 24px;
  color: #666;
}

.item .left {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  height: 100%;
  width: calc(100% - 240px - 20px);
  padding: 0;
}

.item .footer {
  font-size: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 20px;
}

.item .author {
  color: #666;
}

.item .cover {
}

.item .date {
  color: #999;
}

.item .title {
    font-size: 32px;
    color: #333;
    line-height: 42px;
    font-weight: bolder;
    display: -webkit-box;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    max-width: 460px;
    margin-bottom: 30px;
    min-height: 80px;
}

.item .cover img {
  width: 214px;
  height: 156px;
  border-radius: 10px;
}
.new-tag {
  height: 64px;
  line-height: 64px;
  font-size: 44px;
  font-weight: 400;
  color: #fff;
  background-color: red;
  padding: 0 20px;
  border-radius: 8px;
  zoom: 0.5;
  display: inline-block;
  position: relative;
  top: -6px;
  margin-right: 10px;
}
.new-avatar{
    width: 33px;height: 33px;border-radius: 50%;margin-right: 8px;
}
</style>
